// @ts-ignore
import { api } from '@/utils/api';

/** 新增字典信息数据接口 POST /dicInfo/add */
export async function dicInfoAdd(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function dicInfoAdd(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function dicInfoAdd(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function dicInfoAdd(body: BASE.DicInfoVO, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/dicInfo/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/dicInfo/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 字典信息列表数据接口 POST /dicInfo/all */
export async function dicInfoAll(
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultListDicInfoVO>;

export async function dicInfoAll(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultListDicInfoVO>>;

export async function dicInfoAll(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultListDicInfoVO>;

export async function dicInfoAll(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultListDicInfoVO>(`/app/dicInfo/all`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultListDicInfoVO>(`/app/dicInfo/all`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 删除字典信息数据接口 POST /dicInfo/delete */
export async function dicInfoDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function dicInfoDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function dicInfoDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function dicInfoDelete(body: BASE.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/dicInfo/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/dicInfo/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 导入字典信息接口 POST /dicInfo/import */
export async function dicInfoImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BASE.dicInfoImportParams,
  body: {
    dicCode?: string;
  },
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function dicInfoImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BASE.dicInfoImportParams,
  body: {
    dicCode?: string;
  },
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function dicInfoImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BASE.dicInfoImportParams,
  body: {
    dicCode?: string;
  },
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function dicInfoImport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BASE.dicInfoImportParams,
  body: {
    dicCode?: string;
  },
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/dicInfo/import`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      params: {
        ...params
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/dicInfo/import`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    params: {
      ...params
    },
    data: body,
    ...(options || {})
  });
}

/** 根据code获取字典信息数据接口 POST /dicInfo/list */
export async function dicInfoList(
  body: BASE.AutoDtoWithDicinfoList,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultListDicInfoVO>;

export async function dicInfoList(
  body: BASE.AutoDtoWithDicinfoList,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultListDicInfoVO>>;

export async function dicInfoList(
  body: BASE.AutoDtoWithDicinfoList,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultListDicInfoVO>;

export async function dicInfoList(
  body: BASE.AutoDtoWithDicinfoList,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultListDicInfoVO>(`/app/dicInfo/list`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultListDicInfoVO>(`/app/dicInfo/list`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 字典信息分页数据接口 POST /dicInfo/page */
export async function dicInfoPage(
  body: BASE.DicInfoQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultIPageDicInfoVO>;

export async function dicInfoPage(
  body: BASE.DicInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultIPageDicInfoVO>>;

export async function dicInfoPage(
  body: BASE.DicInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultIPageDicInfoVO>;

export async function dicInfoPage(body: BASE.DicInfoQuery, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultIPageDicInfoVO>(`/app/dicInfo/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultIPageDicInfoVO>(`/app/dicInfo/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取字典数据导入模板接口 POST /dicInfo/template */
export async function dicInfoTemplate(options?: ArgumentsType<typeof api>[1]): Promise<any>;

export async function dicInfoTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<any>>;

export async function dicInfoTemplate(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<any>;

export async function dicInfoTemplate(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<any>(`/app/dicInfo/template`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<any>(`/app/dicInfo/template`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 更新字典信息数据接口 POST /dicInfo/update */
export async function dicInfoUpdate(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function dicInfoUpdate(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function dicInfoUpdate(
  body: BASE.DicInfoVO,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function dicInfoUpdate(body: BASE.DicInfoVO, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/dicInfo/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/dicInfo/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
